package com.library.dao;

import com.library.domain.ReaderInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface ReaderInfoDao {
/*
* 注意$和#的区别
*
* */
    int insertOne(ReaderInfo readerInfo);
    @Select("select * from reader_info where username=#{username} ")
    List<ReaderInfo> selectForLogIn( String username);

    @Update("update reader_info set password='${password}' where username='${username}'")
    int resetPassword(String username,String password);



}
